package com.blog.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

public interface ArticlePageViewMapper {
	/**
	 * 添加文章浏览量(在文章发表时添加)
	 * @return
	 */
	@Insert("insert into article_page_view(id,page_view) values(#{id},#{pageView})")
	int save(@Param("id")String id,@Param("pageView")Integer pageView);
	
	/**
	 * 用户浏览时浏览量变动
	 */
	@Update("update article_page_view set pageView = pageView+1 where id = #{id}")
	int change(String id);
}
